<?php
/**
 * Ecma-262 5rd 7.3
 *
 */
class LineTerminator extends InputElement {
    
    public static $LineTerminatorList = array(
        '0xA',        // <Line Feed> 换行
        '0xD',        // <Carriage Return> 回车
        '\u2028',     // <Line separator>
        '\u2029',     // <Paragraph separator>
    );
    
    
    public function __construct() {
        parent::__construct ();
        $this->inputElementType = InputElement::LineTerminator;
    }
    
    public static function isLineTerminator($char){
        $charCode = ord($char);
        if($charCode == 0xA || $charCode == 0xD){
            return true;
        }
        else{
            return false;
        }
    }
}